home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
import1a
/
form1.frm
next >
Wrap
Text File
|
1999-10-20
|
2KB
|
58 lines
VERSION 5.00
Begin VB.Form Form1
BorderStyle = 4 'Fixed ToolWindow
Caption = "X Disabel"
ClientHeight = 615
ClientLeft = 45
ClientTop = 330
ClientWidth = 1455
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 615
ScaleWidth = 1455
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command1
Caption = "E&xit"
Height = 615
Left = 0
TabIndex = 0
Top = 0
Width = 1455
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
End
End Sub
Private Sub Form_Load()
Dim hSysMenu As Long
Dim nCnt As Long
' First, show the form
' Get handle to our form's system menu
' (Restore, Maximize, Move, close etc.)
hSysMenu = GetSystemMenu(Me.hwnd, False)
If hSysMenu Then
' Get System menu's menu count
nCnt = GetMenuItemCount(hSysMenu)
If nCnt Then
' Menu count is based on 0 (0, 1, 2, 3...)
RemoveMenu hSysMenu, nCnt - 1, MF_BYPOSITION Or MF_REMOVE
RemoveMenu hSysMenu, nCnt - 2, MF_BYPOSITION Or MF_REMOVE
' Remove the seperator
DrawMenuBar Me.hwnd
' Force caption bar's refresh. Disabling X button
Me.Caption = "Heh"
End If
End If
End Sub